/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * campaignMainFrm.java
 *
 * Created on Apr 30, 2010, 10:34:59 PM
 */
package com.aptech.campaign.ui;

import com.aptech.campaign.component.GUIProperties;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

/**
 *
 * @author Tai Nguyen
 */
public class CampaignMainFrm extends javax.swing.JFrame {

    /** Creates new form campaignMainFrm */
    public CampaignMainFrm() {
        initComponents();
        setIconImage(new ImageIcon(getClass().getResource("../icon/symbol.png")).getImage());
        setLocationRelativeTo(null);
        try {

            GUIProperties prop = new GUIProperties();
            UIManager.setLookAndFeel(prop.getLookAndFeel());
            SwingUtilities.updateComponentTreeUI(this);


            this.setVisible(true);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(CampaignMainFrm.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(CampaignMainFrm.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CampaignMainFrm.class.getName()).log(Level.SEVERE, null, ex);
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(CampaignMainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        pnlMenu = new javax.swing.JPanel();
        pnlProdcut = new javax.swing.JPanel();
        btnProduct = new javax.swing.JButton();
        pnlCampaign = new javax.swing.JPanel();
        btnCampaign = new javax.swing.JButton();
        pnlEstimateBudget = new javax.swing.JPanel();
        btnEstimateBudget = new javax.swing.JButton();
        pnlActualBudget = new javax.swing.JPanel();
        btnActualBudget = new javax.swing.JButton();
        pnlReport = new javax.swing.JPanel();
        btnReport = new javax.swing.JButton();
        pnlMain = new javax.swing.JPanel();
        pnlCampaignImg = new javax.swing.JPanel();
        lblImg = new javax.swing.JLabel();
        pnlStatusBar = new javax.swing.JPanel();
        lblDesign = new javax.swing.JLabel();
        pnlUser = new javax.swing.JPanel();
        lblUser = new javax.swing.JLabel();
        lblseparator = new javax.swing.JLabel();
        cbbAccount = new javax.swing.JComboBox();
        pnlLogo = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        lblLogo = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        mnuSystem = new javax.swing.JMenu();
        mniLogin = new javax.swing.JMenuItem();
        mniLogOut = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JPopupMenu.Separator();
        mniExit = new javax.swing.JMenuItem();
        mnuManagement = new javax.swing.JMenu();
        mniAccountMana = new javax.swing.JMenuItem();
        mnuHelp = new javax.swing.JMenu();
        mniHelp = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Campaign Information System");
        setMinimumSize(new java.awt.Dimension(900, 600));
        setResizable(false);
        getContentPane().setLayout(new java.awt.GridBagLayout());

        pnlMenu.setBackground(new java.awt.Color(19, 88, 165));
        pnlMenu.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlMenu.setForeground(new java.awt.Color(10, 49, 98));
        pnlMenu.setMaximumSize(new java.awt.Dimension(100, 100));
        pnlMenu.setMinimumSize(new java.awt.Dimension(100, 100));
        pnlMenu.setPreferredSize(new java.awt.Dimension(100, 100));
        pnlMenu.setLayout(new java.awt.GridBagLayout());

        pnlProdcut.setMaximumSize(new java.awt.Dimension(100, 50));
        pnlProdcut.setMinimumSize(new java.awt.Dimension(100, 50));
        pnlProdcut.setLayout(new java.awt.BorderLayout());

        btnProduct.setBackground(new java.awt.Color(0, 0, 0));
        btnProduct.setFont(new java.awt.Font("Tahoma", 1, 20));
        btnProduct.setForeground(new java.awt.Color(10, 50, 78));
        btnProduct.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/campaign/icon/buttonProduct.jpg"))); // NOI18N
        btnProduct.setToolTipText("Product Master");
        btnProduct.setEnabled(false);
        btnProduct.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btnProduct.setMargin(new java.awt.Insets(2, 2, 2, 2));
        btnProduct.setPreferredSize(new java.awt.Dimension(100, 50));
        btnProduct.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnProductActionPerformed(evt);
            }
        });
        pnlProdcut.add(btnProduct, java.awt.BorderLayout.CENTER);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 0.9;
        gridBagConstraints.weighty = 0.18;
        gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 10);
        pnlMenu.add(pnlProdcut, gridBagConstraints);

        pnlCampaign.setMaximumSize(new java.awt.Dimension(100, 50));
        pnlCampaign.setMinimumSize(new java.awt.Dimension(100, 50));
        pnlCampaign.setLayout(new java.awt.BorderLayout());

        btnCampaign.setBackground(new java.awt.Color(0, 0, 0));
        btnCampaign.setFont(new java.awt.Font("Tahoma", 1, 20));
        btnCampaign.setForeground(new java.awt.Color(10, 50, 78));
        btnCampaign.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/campaign/icon/buttonCampaign.jpg"))); // NOI18N
        btnCampaign.setToolTipText("Campaign Master");
        btnCampaign.setAlignmentY(0.2F);
        btnCampaign.setEnabled(false);
        btnCampaign.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btnCampaign.setMargin(new java.awt.Insets(2, 2, 2, 2));
        btnCampaign.setPreferredSize(new java.awt.Dimension(100, 50));
        btnCampaign.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCampaignActionPerformed(evt);
            }
        });
        pnlCampaign.add(btnCampaign, java.awt.BorderLayout.CENTER);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 0.9;
        gridBagConstraints.weighty = 0.18;
        gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 10);
        pnlMenu.add(pnlCampaign, gridBagConstraints);

        pnlEstimateBudget.setMaximumSize(new java.awt.Dimension(100, 50));
        pnlEstimateBudget.setMinimumSize(new java.awt.Dimension(100, 50));
        pnlEstimateBudget.setLayout(new java.awt.BorderLayout());

        btnEstimateBudget.setBackground(new java.awt.Color(0, 0, 0));
        btnEstimateBudget.setFont(new java.awt.Font("Tahoma", 1, 20));
        btnEstimateBudget.setForeground(new java.awt.Color(10, 50, 78));
        btnEstimateBudget.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/campaign/icon/buttonEstimate.jpg"))); // NOI18N
        btnEstimateBudget.setToolTipText("Campaign Master");
        btnEstimateBudget.setEnabled(false);
        btnEstimateBudget.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btnEstimateBudget.setMargin(new java.awt.Insets(2, 2, 2, 2));
        btnEstimateBudget.setPreferredSize(new java.awt.Dimension(100, 50));
        btnEstimateBudget.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEstimateBudgetActionPerformed(evt);
            }
        });
        pnlEstimateBudget.add(btnEstimateBudget, java.awt.BorderLayout.CENTER);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 0.9;
        gridBagConstraints.weighty = 0.18;
        gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 10);
        pnlMenu.add(pnlEstimateBudget, gridBagConstraints);

        pnlActualBudget.setMaximumSize(new java.awt.Dimension(100, 50));
        pnlActualBudget.setMinimumSize(new java.awt.Dimension(100, 50));
        pnlActualBudget.setLayout(new java.awt.BorderLayout());

        btnActualBudget.setBackground(new java.awt.Color(0, 0, 0));
        btnActualBudget.setFont(new java.awt.Font("Tahoma", 1, 20));
        btnActualBudget.setForeground(new java.awt.Color(10, 50, 78));
        btnActualBudget.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/campaign/icon/buttonActual.jpg"))); // NOI18N
        btnActualBudget.setToolTipText("Campaign Master");
        btnActualBudget.setEnabled(false);
        btnActualBudget.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btnActualBudget.setMargin(new java.awt.Insets(2, 2, 2, 2));
        btnActualBudget.setPreferredSize(new java.awt.Dimension(100, 50));
        btnActualBudget.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnActualBudgetActionPerformed(evt);
            }
        });
        pnlActualBudget.add(btnActualBudget, java.awt.BorderLayout.CENTER);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 0.9;
        gridBagConstraints.weighty = 0.18;
        gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 10);
        pnlMenu.add(pnlActualBudget, gridBagConstraints);

        pnlReport.setMaximumSize(new java.awt.Dimension(100, 50));
        pnlReport.setLayout(new java.awt.BorderLayout());

        btnReport.setBackground(new java.awt.Color(0, 0, 0));
        btnReport.setFont(new java.awt.Font("Tahoma", 1, 20));
        btnReport.setForeground(new java.awt.Color(10, 50, 78));
        btnReport.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/campaign/icon/buttonReport.jpg"))); // NOI18N
        btnReport.setToolTipText("Statistics & Report");
        btnReport.setEnabled(false);
        btnReport.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btnReport.setMargin(new java.awt.Insets(2, 2, 2, 2));
        btnReport.setMaximumSize(new java.awt.Dimension(100, 50));
        btnReport.setMinimumSize(new java.awt.Dimension(100, 50));
        btnReport.setPreferredSize(new java.awt.Dimension(100, 50));
        btnReport.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnReportActionPerformed(evt);
            }
        });
        pnlReport.add(btnReport, java.awt.BorderLayout.CENTER);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 0.9;
        gridBagConstraints.weighty = 0.18;
        gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 10);
        pnlMenu.add(pnlReport, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 0.2;
        gridBagConstraints.weighty = 0.65;
        getContentPane().add(pnlMenu, gridBagConstraints);

        pnlMain.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlMain.setMinimumSize(new java.awt.Dimension(100, 100));
        pnlMain.setPreferredSize(new java.awt.Dimension(100, 100));
        pnlMain.setLayout(new java.awt.BorderLayout());

        pnlCampaignImg.setMinimumSize(new java.awt.Dimension(22, 87));
        pnlCampaignImg.setPreferredSize(new java.awt.Dimension(250, 87));
        pnlCampaignImg.setLayout(new java.awt.BorderLayout());

        lblImg.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/campaign/icon/main1.jpg"))); // NOI18N
        pnlCampaignImg.add(lblImg, java.awt.BorderLayout.CENTER);

        pnlMain.add(pnlCampaignImg, java.awt.BorderLayout.CENTER);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 0.8;
        gridBagConstraints.weighty = 0.95;
        getContentPane().add(pnlMain, gridBagConstraints);

        pnlStatusBar.setMaximumSize(new java.awt.Dimension(50, 50));
        pnlStatusBar.setMinimumSize(new java.awt.Dimension(50, 50));
        pnlStatusBar.setPreferredSize(new java.awt.Dimension(50, 1));
        pnlStatusBar.setLayout(new java.awt.GridBagLayout());

        lblDesign.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblDesign.setText("Designed by Clover");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 0.7;
        pnlStatusBar.add(lblDesign, gridBagConstraints);

        pnlUser.setLayout(new java.awt.GridBagLayout());

        lblUser.setFont(new java.awt.Font("Tahoma", 1, 11));
        lblUser.setForeground(new java.awt.Color(0, 0, 153));
        lblUser.setText("UnLogin");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 8);
        pnlUser.add(lblUser, gridBagConstraints);

        lblseparator.setFont(new java.awt.Font("Tahoma", 0, 14));
        lblseparator.setText("|");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 7);
        pnlUser.add(lblseparator, gridBagConstraints);

        cbbAccount.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Account", "ChangePassword", "LogOut" }));
        cbbAccount.setEnabled(false);
        cbbAccount.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbbAccountActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 0;
        pnlUser.add(cbbAccount, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 0.3;
        pnlStatusBar.add(pnlUser, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 0.05;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
        getContentPane().add(pnlStatusBar, gridBagConstraints);

        pnlLogo.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlLogo.setMaximumSize(new java.awt.Dimension(100, 100));
        pnlLogo.setMinimumSize(new java.awt.Dimension(100, 100));
        pnlLogo.setPreferredSize(new java.awt.Dimension(100, 100));
        pnlLogo.setLayout(new java.awt.BorderLayout());

        jPanel2.setLayout(new java.awt.BorderLayout());

        lblLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/campaign/icon/logo.jpg"))); // NOI18N
        jPanel2.add(lblLogo, java.awt.BorderLayout.CENTER);

        pnlLogo.add(jPanel2, java.awt.BorderLayout.CENTER);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 0.2;
        gridBagConstraints.weighty = 0.3;
        getContentPane().add(pnlLogo, gridBagConstraints);

        mnuSystem.setText("System");
        mnuSystem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuSystemActionPerformed(evt);
            }
        });

        mniLogin.setText("Login");
        mniLogin.setEnabled(false);
        mniLogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniLoginActionPerformed(evt);
            }
        });
        mnuSystem.add(mniLogin);

        mniLogOut.setText("LogOut");
        mniLogOut.setEnabled(false);
        mniLogOut.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniLogOutActionPerformed(evt);
            }
        });
        mnuSystem.add(mniLogOut);
        mnuSystem.add(jSeparator1);

        mniExit.setText("Exit");
        mniExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniExitActionPerformed(evt);
            }
        });
        mnuSystem.add(mniExit);

        jMenuBar1.add(mnuSystem);

        mnuManagement.setText("Administrator");
        mnuManagement.setEnabled(false);

        mniAccountMana.setText("Account Management");
        mniAccountMana.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniAccountManaActionPerformed(evt);
            }
        });
        mnuManagement.add(mniAccountMana);

        jMenuBar1.add(mnuManagement);

        mnuHelp.setText("Help");

        mniHelp.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
        mniHelp.setText("Help");
        mnuHelp.add(mniHelp);

        jMenuBar1.add(mnuHelp);

        setJMenuBar(jMenuBar1);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnEstimateBudgetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEstimateBudgetActionPerformed
        pnlMain.removeAll();
        EstimateBudgetPnl est = new EstimateBudgetPnl();
        pnlMain.add(est);
        pnlMain.validate();
    }//GEN-LAST:event_btnEstimateBudgetActionPerformed

    private void btnCampaignActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCampaignActionPerformed
        pnlMain.removeAll();
        CampaignPnl pnlCam = new CampaignPnl();
        pnlMain.add(pnlCam);
        pnlMain.validate();
    }//GEN-LAST:event_btnCampaignActionPerformed

    private void btnProductActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnProductActionPerformed
        pnlMain.removeAll();
        ProductPnl pnlPro = new ProductPnl();
        pnlMain.add(pnlPro);
        pnlMain.validate();
    }//GEN-LAST:event_btnProductActionPerformed

    private void mniAccountManaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniAccountManaActionPerformed
        AdministratorFrm admin = new AdministratorFrm();
        admin.setSize(800, 500);
        admin.setVisible(true);
        validate();
    }//GEN-LAST:event_mniAccountManaActionPerformed
    private void mniExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniExitActionPerformed
        System.exit(1);
    }//GEN-LAST:event_mniExitActionPerformed

    private void btnActualBudgetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActualBudgetActionPerformed
        pnlMain.removeAll();
        ActualBudgetPnl act = new ActualBudgetPnl();
        pnlMain.add(act);
        pnlMain.validate();
    }//GEN-LAST:event_btnActualBudgetActionPerformed

    private void btnReportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReportActionPerformed
        pnlMain.removeAll();
        ReportPnl re = new ReportPnl();
        pnlMain.add(re);
        pnlMain.validate();
    }//GEN-LAST:event_btnReportActionPerformed

    private void mniLogOutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniLogOutActionPerformed
        btnActualBudget.setEnabled(false);
        btnCampaign.setEnabled(false);
        btnEstimateBudget.setEnabled(false);
        btnProduct.setEnabled(false);
        btnReport.setEnabled(false);
        mnuManagement.setEnabled(false);
        mniAccountMana.setEnabled(false);
        mniLogOut.setEnabled(false);        
        mniLogin.setEnabled(false);
        cbbAccount.setEnabled(false);
        lblUser.setText("UnLogin");
        // reset main panel
        pnlMain.removeAll();
        BackgroundPnl bac = new BackgroundPnl();
        pnlMain.add(bac);
        pnlMain.validate();
        //
        LoginDlg login = new LoginDlg(this, true);
        login.setSize(350, 220);
        login.setVisible(true);
    }//GEN-LAST:event_mniLogOutActionPerformed

    private void mnuSystemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuSystemActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_mnuSystemActionPerformed

    private void mniLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniLoginActionPerformed
        LoginDlg login = new LoginDlg(this, true);
        login.setSize(350, 220);
        login.setVisible(true);
    }//GEN-LAST:event_mniLoginActionPerformed

    private void cbbAccountActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbbAccountActionPerformed
        if (cbbAccount.getSelectedIndex() == 1) {
            cbbAccount.setSelectedIndex(0);
             ChangePasswordDlg pas = new ChangePasswordDlg(this, true);
            pas.setSize(400, 300);
            pas.lblUserName.setText(lblUser.getText());
            pas.setVisible(true);

        } else if (cbbAccount.getSelectedIndex() == 2) {
            cbbAccount.setSelectedIndex(0);
           mniLogOutActionPerformed(null);

        }
    }//GEN-LAST:event_cbbAccountActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                CampaignMainFrm main = new CampaignMainFrm();
                main.setVisible(true);
                LoginDlg login =  new LoginDlg(main, true);
                login.setSize(350, 220);
                login.setVisible(true);

            }
        });


    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JButton btnActualBudget;
    public javax.swing.JButton btnCampaign;
    public javax.swing.JButton btnEstimateBudget;
    public javax.swing.JButton btnProduct;
    public javax.swing.JButton btnReport;
    public javax.swing.JComboBox cbbAccount;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPopupMenu.Separator jSeparator1;
    private javax.swing.JLabel lblDesign;
    private javax.swing.JLabel lblImg;
    private javax.swing.JLabel lblLogo;
    public javax.swing.JLabel lblUser;
    private javax.swing.JLabel lblseparator;
    public javax.swing.JMenuItem mniAccountMana;
    public javax.swing.JMenuItem mniExit;
    public javax.swing.JMenuItem mniHelp;
    public javax.swing.JMenuItem mniLogOut;
    public javax.swing.JMenuItem mniLogin;
    private javax.swing.JMenu mnuHelp;
    public javax.swing.JMenu mnuManagement;
    public javax.swing.JMenu mnuSystem;
    private javax.swing.JPanel pnlActualBudget;
    private javax.swing.JPanel pnlCampaign;
    private javax.swing.JPanel pnlCampaignImg;
    private javax.swing.JPanel pnlEstimateBudget;
    private javax.swing.JPanel pnlLogo;
    private javax.swing.JPanel pnlMain;
    private javax.swing.JPanel pnlMenu;
    private javax.swing.JPanel pnlProdcut;
    private javax.swing.JPanel pnlReport;
    private javax.swing.JPanel pnlStatusBar;
    private javax.swing.JPanel pnlUser;
    // End of variables declaration//GEN-END:variables
}
